﻿
namespace Marmat.Forms.Views.Grid
{
    public class CustomRowCellEventArgs : GridEventArgs
    {
        private Column _column;
        private int _rowHandle;

        public CustomRowCellEventArgs(BaseGrid gridControl, int rowHandle, Column column) : base(gridControl)
        {
            this._rowHandle = rowHandle;
            this._column = column;
        }
        /// <summary>
        /// 获取当前处理单元格对应的列
        /// </summary>
        /// <returns></returns>
        public Column Column
        {
            get
            {
                return this._column;
            }
        }

        /// <summary>
        /// 获取当前处理单元格对应的行。
        /// </summary>
        /// <returns></returns>
        public int RowHandle
        {
            get
            {
                return this._rowHandle;
            }
        }

        /// <summary>
        /// 返回当前处理的单元格值。
        /// </summary>
        /// <returns></returns>
        public object CellValue
        {
            get
            {
                return this.GridControl.GetRowCellValue(this.RowHandle, this.Column);
            }
        }
    }
}